class Farm < ActiveRecord::Base
	belongs_to :National, :foreign_key => :national_id
  has_many :Product
  has_many :Productorigin

	
	validates_presence_of :farmName, 
	:message => "농장이름을 입력해 주세요"
        
	validates_presence_of :enFarmName,
	:message => "농장이름을 영문으로 입력해 주세요"
	validates_uniqueness_of :enFarmName,
	:message => "used farm name(s)"
end
